package cloudgamesaumysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/12/11 15:13
*/

// CGGameAUConversionCodeUsedByUser 云游戏AU兑换码的核销表
type CGGameAUConversionCodeUsedByUser struct {
	ID             int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	UserID         int64          `json:"user_id" gorm:"column:user_id;type:bigint;not null;default:0;comment:用户ID"`
	Phone          string         `json:"phone" gorm:"column:phone;type:varchar(20);not null;default:'';comment:用户手机号"`
	NickName       string         `json:"nick_name" gorm:"column:nick_name;type:varchar(32);not null;default:'';comment:用户昵称"`
	ConversionCode string         `json:"conversion_code" gorm:"column:conversion_code;type:varchar(500);not null;default:'';comment:兑换码"`
	CloudCoupon    int64          `json:"cloud_coupon" gorm:"column:cloud_coupon;type:bigint;not null;default:0;comment:云玩点数；实际上后端会在转化为毫秒再计算"`
	CreatedAt      time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt      time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt      gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUConversionCodeUsedByUser) TableName() string {
	return "cg_game_au_conversion_code_used_by_user"
}
